package com.sh.caryr.erp.custmz;

import java.util.HashMap;
import java.util.Map;

public class Layout {
	
	public Map<String,String> data = new HashMap<String,String>();
	public String[] searchDisFld;
	public String[] tableDisFld;
	public String[] formDisFld;
	public String[] formEditFld;
	
	public void put(String key,String value){
		data.put(key, value);
	}
	public String get(String key){
		return data.get(key);
	}
	
	public boolean isSearchDisFld(String field){
		return containFields(searchDisFld,field);
	}
	
	public boolean isTableDisFld(String field){
		return containFields(tableDisFld,field);
	}
	
	public boolean isFormDisFld(String field){
		return containFields(formDisFld,field);
	}
	
	public boolean isFormEditFld(String field){
		return containFields(formEditFld,field);
	}
	
	private boolean containFields(String fieldList[],String field){
		if(fieldList!=null){
			for(int i =0;i<fieldList.length;i++){
				if(fieldList[i].equals(field)){
					return true;
				};
			}
		}
		return false;
	}
}
